package logic

import (
	"context"
	takeout "takeout-ordering/common/proto"
	"takeout-ordering/rpc/sever"
)

type SeverTakeout struct {
	takeout.UnimplementedTakeoutServer
}

func (s SeverTakeout) UserRegister(ctx context.Context, in *takeout.UserRegisterReq) (*takeout.UserRegisterResp, error) {
	register, err := sever.UserRegister(in)
	if err != nil {
		return nil, err
	}
	return register, nil
}
func (s SeverTakeout) UserLogin(ctx context.Context, in *takeout.UserLoginReq) (*takeout.UserLoginResp, error) {
	register, err := sever.UserLogin(in)
	if err != nil {
		return nil, err
	}
	return register, nil
}
func (s SeverTakeout) MealsList(ctx context.Context, in *takeout.MealsListReq) (*takeout.MealsListResp, error) {
	register, err := sever.MealsList(in)
	if err != nil {
		return nil, err
	}
	return register, nil
}
func (s SeverTakeout) CreateOrder(ctx context.Context, in *takeout.CreateOrderReq) (*takeout.CreateOrderResp, error) {
	register, err := sever.CreateOrder(in)
	if err != nil {
		return nil, err
	}
	return register, nil
}

func (s SeverTakeout) OrderPay(ctx context.Context, in *takeout.OrderPayReq) (*takeout.OrderPayResp, error) {
	register, err := sever.OrderPay(in)
	if err != nil {
		return nil, err
	}
	return register, nil
}
func (s SeverTakeout) Payback(ctx context.Context, in *takeout.PaybackReq) (*takeout.PaybackResp, error) {
	register, err := sever.Payback(in)
	if err != nil {
		return nil, err
	}
	return register, nil
}
func (s SeverTakeout) FindCoupon(ctx context.Context, in *takeout.FindCouponReq) (*takeout.FindCouponResp, error) {
	register, err := sever.FindCoupon(in)
	if err != nil {
		return nil, err
	}
	return register, nil
}
func (s SeverTakeout) UserOrderList(ctx context.Context, in *takeout.UserOrderListReq) (*takeout.UserOrderListResp, error) {
	register, err := sever.UserOrderList(in)
	if err != nil {
		return nil, err
	}
	return register, nil
}

func (s SeverTakeout) CouPonReceive(ctx context.Context, in *takeout.CouPonReceiveReq) (*takeout.CouPonReceiveResp, error) {
	register, err := sever.CouPonReceive(in)
	if err != nil {
		return nil, err
	}
	return register, nil
}
